home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / database / hklib01 / hklib01.doc next >
Text File  |  1987-05-01  |  9KB  |  322 lines

  1.  
  2.    Howard Kapustein's Library of Clipper functions
  3.  
  4.    Version 0.10         05-01-1987
  5.  
  6.    Copyright (c) Howard Kapustein 1987
  7.  
  8.  
  9.    I am an overworked college student who took time out from
  10.    studying so I could put this all together. If you find this
  11.    library to be of use, and would like to see more functions 
  12.    in the future, a small contribution might inspire me. The
  13.    contribution can be any amount you wish. I recommend $5 but
  14.    feel free to send whatever you think this library is worth
  15.    to you.
  16.  
  17.    Please send all contributions, comments, and/or suggestions to:
  18.  
  19.      Howard Kapustein
  20.      1695 Barbara Lane
  21.      East Meadow, NY  11554
  22.  
  23.    I can be reached at The BOSS BBS in New Jersey: (201) 568-7293.
  24.    If you have any interest in Clipper, I highly recommend The BOSS.
  25.    Dirk Lesko runs a Clipper conference where you can talk to many 
  26.    experts from around country as well as check out the latest
  27.    information about Clipper, including bug lists, UDFs, and much more.
  28.  
  29.  
  30.    The files included with Howard Kapustein's Library Ver. 0.10 are:
  31.  
  32.        hklib01.lib      - Howard Kapustein's Library Ver. 0.10
  33.        hklib01.doc      - documentation for Library Ver. 0.10
  34.        hktest01.prg     - use this to test library functions
  35.  
  36.    To use any of the functions listed here, just include the function
  37.    name in your code and add the library file when linking your program.
  38.  
  39.    For another excellent library of Clipper functions, check out Dirk 
  40.    Lesko's libraries DL1A and DL1B (for use with Winter'85 and Autumn'86
  41.    versions respectively). And don't forget to call The BOSS BBS (201) 568-7293
  42.  
  43.  
  44.  
  45.      DISCLAIMER OF WARRANTIES
  46.      ────────────────────────
  47.  
  48.         Howard Kapustein distributes these functions solely on an 
  49.         "as is" basis and offers no warranties, period.
  50.  
  51.         Howard Kapustein shall not bear any liability or responsibility
  52.         to any user or entity with respect to any liability, loss or
  53.         damage caused, or alleged to be caused directly, or indirectly
  54.         by the functions contained in this product, including but not
  55.         limited to interruption of services, loss of business or
  56.         anticipatory profits or consequential damages resulting from
  57.         the use or operation of any of the functions contained in this
  58.         product.
  59.  
  60.         Howard Kapustein makes no warranties, either expressed or implied
  61.         regarding this software product, it's merchantibility and/or
  62.         it's fitness for a particular purpose. The user agrees that
  63.         Howard Kapustein shall not be held liable for any consequential
  64.         damages, even if Howard Kapustein has been advised of the
  65.         possibility of such damages.
  66.  
  67.         By using any of the functions contained in this library, you
  68.         acknowledge your agreement with all of the above conditions.
  69.  
  70.  
  71.  
  72.      LICENSING
  73.      ─────────
  74.  
  75.         You may incorporate any of the functions into software
  76.         applications you develop, and you may distribute copies
  77.         of the programs to anyone you wish.
  78.  
  79.         Feel free to make copies of the library, and to pass
  80.         them along to other users of Clipper. so as to further
  81.         perpetuate the dBASE language, and the Clipper compiler.
  82.  
  83.         No source code is released with this library, and none
  84.         is available for release onto the BBS sytems. You may
  85.         upload and download copies of Howard Kapustein's Library
  86.         onto any bulletin board you like, and you may distribute
  87.         copies of Howard Kapustein's Library as long as no fee
  88.         is charged, and all Copyright notices are left intact.
  89.  
  90.         Although no source code is released with this library,
  91.         if you would like a copy, contact me and I will probably
  92.         give it to you. Howard Kapustein reserves the right not to
  93.         release the source code at any time, as well as the right
  94.         to ask for payment in exchange for the source code.
  95.  
  96.  
  97.  
  98.      TRADEMARK NOTICE
  99.      ────────────────
  100.  
  101.         Clipper is a trademark of Nantucket Corporation
  102.         dBASE is a trademark Ashton-Tate
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112. OK, enough with the legal mumbo-jumbo. Here are the functions:
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121. ════════════════════════════════════════════════════════════════
  122. Clipper  1                    CENTER() FUNCTION
  123. ________________________________________________________________
  124.  
  125.         SYNTAX: @ 3,CENTER(mem_var) SAY mem_var
  126.  
  127.     PARAMETERS: <expC> character string
  128.  
  129.        RETURNS: <expN> integer
  130.  
  131.        PURPOSE: to find the column to print at so <mem_var> will
  132.                 be at the centered
  133.  
  134.          NOTES: returns INT((80-LEN(mem_var))/2)
  135.  
  136.        EXAMPLE: message = "Press any key to continue"
  137.                 @ 3,CENTER(message) SAY message
  138.  
  139.  
  140.  
  141.  
  142.  
  143. ════════════════════════════════════════════════════════════════
  144. Clipper  1                    DOL_STR() FUNCTION
  145. ________________________________________________________________
  146.  
  147.         SYNTAX: mem_var = DOL_STR(<expN>)
  148.  
  149.     PARAMETERS: <expN> numeric value to convert
  150.  
  151.        RETURNS: character string in the form $99,999.99
  152.  
  153.        PURPOSE: To convert a number to a dollar string format
  154.  
  155.          NOTES: if a negative number is converted, it will be in
  156.                 the form $-99,999.99
  157.                 only the first 2 decimal places are converted
  158.  
  159.        EXAMPLE: m_dol = DOL_STR(62378.93)
  160.                 ?m_dol
  161.  
  162.                 ** returns "$62,378.93"
  163.  
  164.                 m_dol = DOL_STR(-1274.88)
  165.                 ?m_dol
  166.  
  167.                 ** returns "$-1,274.88"
  168.  
  169.                 m_dol = DOL_STR(7422.6321)
  170.                 ?m_dol
  171.  
  172.                 ** returns "$7,422.63"
  173.  
  174.  
  175.  
  176.  
  177.  
  178. ════════════════════════════════════════════════════════════════
  179. Clipper  1                    MOD() FUNCTION
  180. ________________________________________________________________
  181.  
  182.         SYNTAX: mem_var = MOD(<expN>,<expN>)
  183.  
  184.     PARAMETERS: <expN> dividend
  185.                 <expN> divisor
  186.  
  187.        RETURNS: <expN> remainder of <expN>/<expN>
  188.  
  189.        PURPOSE: to find the remainder of a division
  190.  
  191.          NOTES: the parameters passed to MOD() must be numeric
  192.  
  193.        EXAMPLE: m_var = MOD(5,3)
  194.                 ?m_var
  195.  
  196.                 ** returns 2
  197.  
  198.                 m_var = MOD(4.5,2)
  199.                 ?m_var
  200.  
  201.                 ** returns .5
  202.  
  203.  
  204.  
  205.  
  206.  
  207. ════════════════════════════════════════════════════════════════
  208. Clipper  1                    ISSTATE() FUNCTION
  209. ________________________________________________________________
  210.  
  211.         SYNTAX: mem_var = ISSTATE(<expC>)
  212.  
  213.     PARAMETERS: <expC> is a 2-letter state abbreviation
  214.  
  215.        RETURNS: .T. if <expC> is a valid 2-letter state abbreviation
  216.                 .F. otherwise
  217.  
  218.        PURPOSE: to test if an entry is a valid state abbreviation
  219.  
  220.          NOTES: ISSTATE() checks if the parameter passed to it is <expC>
  221.                 <expC> must be all upper-case
  222.  
  223.        EXAMPLE: ?ISSTATE("NY")
  224.  
  225.                 ** returns .T.
  226.  
  227.                 ?ISSTATE("NEW YORK")
  228.  
  229.                 ** returns .F.
  230.  
  231.       SEE ALSO: STABBR(), STFULL()
  232.  
  233.  
  234.  
  235.  
  236.  
  237. ════════════════════════════════════════════════════════════════
  238. Clipper  1                    MOD() FUNCTION
  239. ________________________________________________________________
  240.  
  241.         SYNTAX: mem_var = MOD(<expN>,<expN>)
  242.  
  243.     PARAMETERS: <expN> dividend
  244.                 <expN> divisor
  245.  
  246.        RETURNS: <expN> remainder of <expN>/<expN>
  247.  
  248.        PURPOSE: to find the remainder of a division
  249.  
  250.          NOTES: parameters passed to MOD() must be numeric
  251.  
  252.        EXAMPLE: m_var = MOD(5,3)
  253.                 ?m_var
  254.  
  255.                 ** returns 2
  256.  
  257.                 m_var = MOD(4.5,2)
  258.                 ?m_var
  259.  
  260.                 ** returns .5
  261.  
  262.  
  263.  
  264.  
  265.  
  266. ════════════════════════════════════════════════════════════════
  267. Clipper  1                    STABBR() FUNCTION
  268. ________________________________________________________________
  269.  
  270.         SYNTAX: mem_var = STABBR(<expC>,<expL>)
  271.  
  272.     PARAMETERS: <expC> is a state name
  273.                 <expL> is whether STABBR should be case sensitive
  274.  
  275.        RETURNS: the 2-letter abbreviation of <expC>
  276.  
  277.        PURPOSE: to convert a state name to its abbreviation
  278.  
  279.          NOTES: if <expC> is not a state name, "**" is returned
  280.  
  281.        EXAMPLE: ?STABBR("NEW YORK",.F.)
  282.  
  283.                 ** returns "NY"
  284.  
  285.                 ?STABBR("NEW",.F.)
  286.  
  287.                 ** returns "**"
  288.  
  289.                 ?STABBR("New York",.T.)
  290.  
  291.                 ** returns "NY"
  292.  
  293.                 ?STABBR("New",.T.)
  294.  
  295.                 ** returns "**"
  296.  
  297.  
  298.  
  299.  
  300.  
  301. ════════════════════════════════════════════════════════════════
  302. Clipper  1                    STFULL() FUNCTION
  303. ________________________________________________________________
  304.  
  305.         SYNTAX: mem_var = STFULL(<expC>)
  306.  
  307.     PARAMETERS: <expC> is a state abbreviation
  308.  
  309.        RETURNS: the state name for the abbreviation <expC>
  310.  
  311.        PURPOSE: to convert a state abbreviation to its name
  312.  
  313.          NOTES: if <expC> is not a state abbreviation, "*" is returned
  314.                 <expC> must be all upper-case
  315.  
  316.        EXAMPLE: ?STFULL("NY")
  317.  
  318.                 ** returns "New York"
  319.  
  320.                 ?STFULL("NEW YORK")
  321.  
  322.                 ** returns "*"